<!DOCTYPE html>
<html lang="zh">

<head>
	<meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1" />
	<meta http-equiv=content-type content="text/html;charset=utf-8" />
	<meta name=viewport content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<title></title>
	<script>
		//禁止双手缩放
		document.addEventListener('gesturestart', function (event) {
			event.preventDefault();
		});
	</script>

	<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
	<style>
		* {
			margin: 0;
			padding: 0;
			-webkit-box-sizing: border-box;
			box-sizing: border-box;
		}

		body,
		html {
			font-family: -apple-system-font, Roboto, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, sans-serif;
			font-size: 14px;
		}

		.content {
			padding: 20px;
			color: #666;
			font-size: 14px;
			line-height: 25px;
			text-align: justify;
		}

		.content h2 {
			font-weight: 400;
			color: #333;
			font-size: 20px;
			margin-bottom: 30px;
		}

		.content p {
			text-indent: 25px;
			margin-bottom: 15px;
		}

		.content dl dt {
			font-size: 16px;
			line-height: 30px;
			margin: 15px 0;
			color: #555;
		}

		.content dl dd {
			margin: 0;
			padding: 0;
		}

		.content ol {
			list-style: none;
		}

		.content ol li {
			margin-bottom: 15px;
		}
	</style>

	<link rel="stylesheet" href="vant/index.css" />
	<script src="vant/vue.min.js"></script>
	<script src="vant/vant.min.js"></script>
	<script src="vant/axios.min.js"></script>
	<script src="vant/qs.min.js"></script>
</head>

<body>
	<div id="app">
		<template>
			<div class="content">
				<h2>用户协议</h2>
				<div v-html="config.term"></div>
			</div>
		</template>
	</div>
</body>

<script>
	axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';

	new Vue({
		el: '#app',
		data() {
			return {
				config: {}
			}
		},

		computed: {

		},

		methods: {
			rpx() {
				document.documentElement.style.fontSize = document.documentElement.clientWidth / 37.5 + 'px';
			},

			async initData() {
				this.config = await axios.get('api/config', Qs.stringify({})).then(({ data }) => data?.data || ({}));
			},
		},

		mounted() {
			this.rpx();

			window.addEventListener('resize', this.rpx, true);

			this.initData();
		}
	});
</script>

</html>